<template>
	<!-- 帮助 -->
	<view class="header">
		<!-- 头部 -->
		<hx-navbar ref="hxnb" :config="config" >
			<block slot="right">
				<view style="margin-right: 20rpx;" @click="feedback">
					反馈
				</view>
			</block>
		</hx-navbar>
		<view style="padding: 30rpx;">
			<!-- <view class="title">
				一、商户进件
			</view> -->
			<uni-collapse  class="uni-collapse" accordion
				v-model="accordionVal" @change="change">
				<uni-collapse-item v-for="(item,index) in helpData" :key="index" :title="index + 1 + '、'+item.name">
					<view class="content">
						<text class="text">{{item.content}}</text>
					</view>
				</uni-collapse-item>
			</uni-collapse>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				accordionVal: '',
				config: {
					title: '帮助',
					color: '#111111',
					backgroundColor: [1, '#FFFFFF'],
					rightSlot: true,
					border: true,
					// #ifdef H5
					backPage: '',
					// #endif
				},
				helpData: []
			}
		},
		created() {
			this.helpList(1, 10)
		},
		methods: {
			//帮助列表
			helpList(num, size) {
				let data = {
					pageNo: num,
					pageSize: size,
				}
				this.$api.helpList(data).then((res) => {
					this.helpData = res.data.result.list
					if (num == 1) {
						this.helpData = res.data.result.list
					} else {
						this.helpData = this.projectList.concat(res.data.result.list)
					}
					this.mescroll.endBySize(res.data.result.list.length, res.data.result
						.total);
					console.log('宋人头的亚轩', res)
				})
			},
			// 反馈
			feedback(){
				this.$tools.goPageNoAuth('/clientEnd/page/decoration/feedback')
			},
			change(e) {
				console.log(e);
			}
			//返回上一页
			// goBack() {
			// 	uni.navigateBack(1)
			// },
		}
	}
</script>

<style scoped>
	.content {
		padding: 15px;
	}

	.text {
		font-size: 32rpx;
		font-weight: 500;
		color: #1E1E1E;
		line-height: 40rpx;
		padding: 0 30rpx;
	}

	.uni-collapse {
		width: 662rpx;
		padding: 24rpx 30rpx;
		margin: 0 auto;
		background: #FFFFFF;
		/* box-shadow: 0rpx 6rpx 18rpx 2rpx rgba(30, 30, 30, 0.1); */
		border-radius: 12rpx 12rpx 12rpx 12rpx;
	}

	.title {
		font-size: 36rpx;
		font-weight: 400;
		color: #1E1E1E;
		padding: 30rpx 0;
	}
</style>
